Source Edit Help

Source Edit is a free award winning text editor especially made for developers. It doesn't matter what language you develop in, Source Edit is the tool to use.

This help file will explain all the menu commands that are available in Source Edit. More help can be found in the Source Edit Forum and on the Tips and Resource page of the Source Edit website http://www.sourceedit.com.

This documentation has been created using Source Edit and Microsoft ® HTML Help Workshop. Copyright © 2001-2003 Joacim Andersson


License agreement

Licence agreement

Disclaimer

SOURCE EDIT IS PROVIDED "AS IS" AND WITHOUT ANY WARRANTY AS TO MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE OR ANY OTHER WARRANTIES EITHER EXPRESSED OR IMPLIED. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISUSING THIS SOFTWARE.

Terms of use

Source Edit is provided for free, so you are granted a license to use this software without charge. The only limitation to this usage is distribution. Source Edit is an Internet-only application which means that you can not distribute this software without the expressed permission by the author. But you may put a link to the Source Edit web site http://www.sourceedit.com on your site, and we encourage you to do so if you like the software.


File menu

New

Create a new blank document. You may specify a default language (syntax highlighter) to use for new documents on the Language/Tabs page of the Options dialog box.

If you click New on the File menu (not the Toolbar or through a shortcut key) the New document dialog box will be shown. This dialog shows all File Templates you have created. By default this dialog only have a "Blank document" item which will be used by default when you click the New button on the Standard toolbar.

Open

Browse and open an existing file. With this dialog box you can also reach the Recent Files. And you can also add and remove a folder to the internal favorites list. It's also possible to open files using the file view in the Toolbox Window.

Close and Close all

Close the current or all opened documents. If a file has been altered you will be asked if you want to save any changes you have done.

Revert to Saved

You can at any time discard all changes you have made and revert back to the original, last saved, file.

Save, Save As, Save All

Save the current or all opened documents. Save As allows you to save the file to a different name and/or folder.

Save selection

Save the currently selected text to a file.

FTP

Source Edit has a small built-in FTP client which you can use to Save or Open a file directly to/from a FTP server. Both the FTP Open and FTP Save As commands will bring up the FTP Accounts dialog box in which you can create or select an already created account to use as the connection. You can also launch File Courier from this menu. File Courier is a stand-alone FTP client.

To create a new account click the New button and type in a name for the new account. Type in the URL or IP address of the FTP server (don't type the ftp:// part). Now type in the User ID and Password to use and optionally check the Save Password option, if you leave this option unchecked you will be forced to type the password every time you use this account. However if checked the password will be saved together with the other information and there might be security issues with that.

You can type an initial directory path to use when first connected. You can use either a forward slash (/) or a backslash (\) as the directory separator. Source Edit will translates the directory name separator to the appropriate character before they are used.

The IP or Proxy port must be given (default is 21). If you're using a proxy server to connect you must supply the name of the proxy. Also pick how you want the file to be transfered, as ASCII or Binary file.

If you already created one or more accounts pick the one you want to use in the Account Name drop-down list, make sure all required fields are supplied and click OK to connect.

Either the FTP Open or FTP Save dialog will now be visible. To open a file simply select it and click the Open button. To save select the correct directory, type in a name for the file and click the Save button.

If you have opened a remote file and made changes to it you can use the regular Save command to save the changes back to the FTP server. Source Edit will then reconnect to the server and save the file. If you want to save it with another name or to another directory use the FTP Save As command.

All files opened or saved from/to a remote server will be added to the Most Recently Used file list and you can reopen the file simply by clicking on it in that list.

Note that the FTP Open command will open the file directly in Source Edit so you should only use this command on text files.

Print, Print All

Print the current document. If you use the toolbar button the default printer will always be used but by clicking the menu item will allow you to select a printer. You can also use the Print All command on the File menu to print all currently open documents.

Page Setup

Shows the Page Setup dialog box in which you can set margins, font, a header and a footer to be used when printing.

Print Preview

Will bring up the print preview window.

Insert File

Inserts the contents of another file at the current caret position.

More Files

Shows the recent files dialog. It shows the 50 last documents you have edited with Source Edit.


File Templates

Source Edit allows the creation of Templates for all new documents you create. When you click on New on the File menu the New Document dialog box will be presented (this is not shown when you click on New on the Standard toolbar or if you press the shortcut key combination for this command). This dialog has a tabbed interface which by default only have one tab (General) with one item (Blank document). You can however create new tabs and items for your templates. The File Templates are located in the Templates subfolder of where you have Source Edit installed. If you create a new subfolder in the Templates folder it will be shown as a new tab in this dialog. All files in the folder will be shown as File Template items.

A file template can have any name including any file extension. However the file extension of the template will determent the syntax highlighter that will be used. For example if you name a File Template: Standard.htm the HTML syntax highlighter will be used when you create a new document from this template (see File Mapping). If you would create a subfolder named HTML in the Templates folder, this file would be shown on the HTML tab in the dialog.

The template that will be used by default is named "Blank document" (it will be created if it doesn't exist). This file doesn't have a file extension and can't have one either. You can however edit the content of this file if you wish. It will then be used every time you press the shortcut key (Ctrl+N by default) or the New button on the Standard toolbar. Since this file can't have a file extension the default syntax highlighter will be used. You can specify a default highlighter on the Language/Tabs page of the Options dialog box.

See also: Code Templates


Edit menu

Undo, Redo

This will undo (or redo) the last editing task. Source Edit supports unlimited undo actions but you can limit the number of undo actions if you want to preserve some memory. You can set the limit on the Settings page of the Options dialog box.

Cut, Copy, Paste

Source Edit of course supports the standard clipboard actions. Cut or Copy selected text and put them on the clipboard. Paste text from the clipboard into the active document.

Paste and Cycle, Clipboard History

Upon opening Source Edit, the program registers itself with Windows as a Clipboard Viewer, giving Source Edit the ability to be informed of Windows Clipboard changes automatically. By default Source Edit maintains a history of the last 15 text items posted to the Clipboard, this value can be altered using the Settings page of the Option dialog box.

The Clipboard History command will bring up a dialog box that allows you to view and browse the history and pick a clip to paste in to the current document.

The Paste and Cycle command works much like the regular paste command except that it will keep the pasted text selected and if you hit the command again it will paste the previous clip in the history and keep on cycling through the clipboard history.

Delete

Delets the selected text in the current document.

Cut Current Line

This command will cut the current line and put it on the Windows Clipboard. You don't have to select any text before picking this command.

Read Only

This command will put the current document in read-only mode. Source Edit will then not allow you to change the content. This is a usefull feature for files that you have opened for reference only and shouldn't be changed by accident. However it's only the memory buffer Source Edit use to store the contents of the file that will be read-only. No file locks will exists, because of this the file can still be altered in another application outside of Source Edit. If this occurs Source Edit will warn you that the file has been changed and ask you if you want to reload the document or not. This question will also be asked even if the document isn't in read-only mode but has been altered outside of Source Edit. Since no file lock exists Source Edit allows you to save a read-only document which would alter the time stamp of the file.

Select Line

This command will select the current line.

Select All

Selects all text in the current document.

Select Range

Shows the Select Range dialog box.

In this dialog you can specify the line and column a selection should start and end with. If you already have text selected when you launch this dialog the current range will be shown. The Select in Column mode option will select the range as a rectangular selection. As shown below:

You can also select in Column mode with the mouse if you hold down either the Ctrl or the Alt key while dragging the mouse over the text.

File Format

You can change the format of the current opened file. There are 4 different options here: DOS, Unix, Macintosh and Unicode. By default Source Edit will keep the format the file had when it was opened.

The line ending characters these three different systems use are:

DOS (and Windows) : Both a Carriage Return (CR) and a Line Feed (LF) character
Unix : a LF character
Macintosh : a CR character

Replace Tabs with Spaces, Replace Spaces with Tabs

These two commands will replace tabs with spaces or the other way around in the selected text.

Trim trailing spaces

This command will remove all trailing whitespaces on each line of the current document.

Time Stamp

Shows the Time Stamp dialog which allows you to insert the current date and/or time in the current document. The format of the date and time will be according to your regional settings.

Comment block, Uncomment block

If the current file use a syntax highlighter for a language that has single line comment character these commands will add or remove comments to a block of selected text. For example: if you are editing a Java class file the Comment block will add the single line comment // at the beginning of each line of the selected text. Uncomment will remove them.

Code Completion

This command will bring up the code completion list. This list will contain all keywords, operators, and so on, that are defined for the current language.

You can insert the selected word from the list by either double clicking it or by pressing Tab or Enter. The Esc key will close the list.


Search menu

Find

Launches the Find dialog box.

The options are Match whole words only and Match case. You can also select in what direction the search should take place. If you click the Mark All button Source Edit will add a bookmark at every line where it finds the searched text.

Source Edit also supports some Regular expression code.

Regular expression syntax:

Wildcards:
? any character
+ one or more of any characters
* zero or more of any characters

Sets of characters:
Characters enclosed in square brackets will be treated as an option set.
Character ranges may be specified with a - (e.g. [a-d])

Logical OR:
Expressions can be ORed together by using the | pipe character

Parenthesized subexpressions:
An expression may be enclosed within parentheses and will be treated as a unit

Escape characters:
Sequences such as \t, etc. will be substituted for an equivalent single character.
A double backslash \\ represents the backslash

More regular expressions.

Find next, Find previous

These commands will find the next (down) or previous (up) instance of the text specified in the Find dialog box.

Replace

Launches the Find and Replace dialog box.

The options are Match whole word and Match case. The Match case option will be used to only find text that matches the case you have entered in the Find text box. The text case in the Replace text box will matched unless you uncheck the Preserve Case option. You may search and replace text either in the entire buffer (the entire document) or in just the selected text. However only the Replace All button will be enabled if you do a Find and Replace in selected text.

Source Edit also supports some regular expressions.

Goto

This command will show the Go to line dialog box. Fill in a line number and hit OK to allow Source Edit to jump to the specified line number.

Find in Files, Replace in Files

Shows the Find/Replace in Files dialog boxes.

Find: The text to search for.
Replace: The text to replace the searched text with (replace dialog only).
In files: Filter for the files to search in. You can specify multiple filters if you separate them with ; semicolons.
Look in: The folder to start the search in.
Search subfolders: Also searches the subfolders of the Look in folder.
Match case: Match the case of the Find text you have specified.
Backup files before replacing text: Makes a backup of the files before replacing text. This backup file will have the same name as the original file with an additional .BAK extension (replace dialog only).
Search Result: Shows the search result. The file name, the path, and at what line number the searched text is found. By double clicking a line in the search result Source Edit will open the file and select the correct line. You can also export the result to the Output window and open the files from there.

If you use the Replace in Files dialog, the search must be completed before any replacement is done which makes it possible to cancel the action before any text is replaced.

Bookmarks

There are 4 different bookmark options on the Search menu.

Toggle bookmark: Set or remove a bookmark on the current line
Next bookmark: Jump to the next bookmark in the current file.
Previous bookmark: Jump to the previous bookmark in the current file.
Clear all bookmarks: Removes all bookmarks from the current file.

On the Settings page of the Options dialog box you have the ability to set the option that will persist bookmarks between sessions. When this option is set, all bookmarks that exist within a document will be automatically updated and restored upon reopening the file.

Function List

If you have specified a Function Pattern for the language you currently editing a document for, Source Edit will parse out all the functions or methods in the current document and show them on the "Function List" tab of the Output window. If you double click a function in the list Source Edit will jump to the correct line in the document. You can refresh the window using the context menu (right click). The functions will also be added to the Code Completion list.


View menu

Using this menu you can customise Source Edit's look and feel to suit your needs. This option allows you to control the different options on toolbars and show or hide the statusbar and document ruler. You can also show or hide the following items:

Toolbox Window

The Toolbox Window is by default docked to the left hand side of the environment, but you have the option to move it to the right hand side if you prefer that.

The file view is a small explorer that allows you to browse and open files from any position in the system. You can also create or delete folders and delete files (deleting folder or files will send them to the Recycle Bin). On the toolbar there is also a button to open the folder of the currently opened file.

In the "View files that match this pattern" drop down at the bottom of the window you can specify what files that should be shown in the file view. You can type in any pattern here but there are also a few available options that already exist in the drop-down list. You can alter these default patterns on the Files page of the Options dialog box.

The Project view will show all files belonging to a currently opened Workspace. It also allows you to add or remove documents to the current workspace.

The Documents tab will show a list of all the current opened documents.

From the Clipboard History tab you can insert clips from the clipboard history either by double clicking an item in the list or by dragging and dropping it to a document.

Output window

The output window is always, when visible, docked to the bottom of the environment. It's used for showing the output of any command line tools you have created with the Tools Configuration dialog box. It can also show the search result if you use the Find/Replace in Files dialog boxes and it will also show the Function List.

Whitespaces

Show or hide whitespaces. Spaces are shown as dots and tab characters are shown as an arrow.


Workspace Manager - Project menu

Project menu

Workspace Manager

Source Edit allows you to create workspaces. A workspace is a group of several files that you want to work with simultaneously. You create, change, and open workspaces with the Workspace Manager. It will also allow you to create folders in your workspaces to organize the files it contains. However a folder can not be empty it must contain at least one file or a subfolder (which in turn must contain a file) or it will be removed from the workspace. This is also the only way to delete a folder, move or remove the files it contains.

To create a new workspace click the "New Workspace" button and give it a name. You can then add files to it either by browsing for the files or by clicking the Add all Open Files button to add all files that are currently opened in Source Edit.

You can close a currently opened project by clicking on the Close Workspace command.

The rest of the Project menu will show a list of up to the last 9 workspaces you have worked with. When you open a new workspace the files will be listed on the Project tab of the Toolbox window from where you can open them.


Tools Configuration - Tools menu

Tools Menu

Tools Configuration

You can add custom tools, like compilers and file viewers, to the environment by using the Tools Configuration dialog box. The tool will be added to the Tools menu and optionally as a button on the toolbar.

Command Line Here you specify the path and name of the tool you want to launch together with the required switches and arguments. You can pass the current file on the command line by using one of the special variables. By clicking the small button with the triangle arrow you will see a menu with the valid values. They are:

$(FullName) = The full path and file name of the current document
$(FileFolder) = The path without the file name
$(FileTitle) = File name with extension
$(FileName) = File name without extension
$(FileExt) = File extension only

Prompt for arguments, if this option is checked a dialog prompting you for additional arguments will be shown when you're running the tool. These arguments will be added to the end of the command line.

Working directory specifies the working directory for the tool. You may use the $(FileFolder) variable here, which will be inserted if you click on the small button with the folder.

Menu Item Text is the text that will appear on the Tools menu for this tool. You can give the menu text an accelerator by typing in an ampersand (&) character before the character you want to use as the accelerator. If you want to include an ampersand as part of the menu text you have to type it twice.

Don't save current file... Check this option if you don't want to save the changes to the current file when running the tool. By default Source Edit will always save the current document.

Save all open files... Set this option if you would like to save all files currently opened in Source Edit before running the tool.

Capture Output Source Edit can capture the output of a command line tool. You can then view the output in the Output Window. Both the output written to StdOut a well as StdOut will be captured.

However if you run a 16-bit program on Windows 9x/Me the capturing method will fail and Source Edit might even hang. To resolve this Source Edit comes with a Redirect 16-bit to 32-bit console application (rd16to32.exe, located in the same folder as Source Edit). Simply precede the command line with the path to rd16to32.exe

Output pattern. This button will bring up the Output Pattern dialog in which you can specify a pattern that describes the output. The pattern is a regular expression that will be used by Source Edit to find the line and column in the document the output is regarding. Ready-made patterns exist for Microsoft Compilers, Borland C++ 5.5, older Borland compilers, Sun Java compiler, GCC, and Perl. If no output pattern is specified EMACS style output is assumed. EMACS style output has the following form: FileName:StartLine:StartColumn:EndLine:EndColumn

Convert OEM characters to ANSI. Use this option to convert DOS characters to Windows characters.

Keep prompt open will keep the command line window open after the tool has finished. Source Edit will by default always close this window.

Put command on toolbar. Check this option if you want Source Edit to create a button on the toolbar for the tool you've created. You can click the Edit Image button to bring up the Button Editor to change the image that will be used on the button. The Menu Item Text you have specified will be used as a tooltip for the button when the mouse cursor is hovering over the button.

You must always click Add or Replace before you close this dialog. You can edit a tool you have created by double clicking the tool in the list box and then click Replace when you are done.

Source Edit doesn't have any restrictions on the number of tools you can add however the Tools menu has a limitation of 12 tools. If you add more then 12 tools a More Tools... menu item will appear on the Tools menu. This will bring up a dialog box from where you can launch any of the tools you have created. The limitation of buttons on the toolbar depends on your screen resolution. The toolbar will not wrap to show all buttons if you have added more then can fit on the screen.

Because of this you should have the tools you use often at the top of the list. The order in the list determents the order in both the menu as well as on the toolbar. You can change the order by clicking the Up and Down buttons to the right of the list.

Button Editor

When you create a tool using the Tools Configuration dialog box you have the ability to create a button on the toolbar for this tool. With the Button Editor you can edit the image that will appear on this button.

The Button Editor is a simple image editor. You can load a predefined image by clicking the Load Image button or you can create an image from scratch by picking a color in the palette and click on the picture. The image can be moved using the navigation arrow buttons.


Language Editor - Tools menu

Tools menu

Language Editor

With the language editor you can add or change the language definition that is used for the syntax highlighting in Source Edit.

You select the language definition you want to edit in the drop-down list. You might notice that not all languages that Source Edit supports is listed in this list. This is because some of the original languages, like HTML, XML, Java, C/C++, and Visual Basic for example, that Source Edit supports is hard coded into the editor. You can still edit them though. For example let's say you want to edit the definition for Java. To do that click the New language [image] button and name the new language Java and also select to base this on the the original Java language.

When you create a new language definition a *.lng file will be created. These files will always be used before one of the hard coded definitions. You can also create a new file based on any of the current definitions if you like.

The language editor consists of 7 "pages" on which you add the different keywords, operators, and so on.

Misc Settings

Language Style is either procedural or SGML.

Escape character. If the language uses an escape character type it in this box.

String delimiters. Add all string delimiters to this list. With most lists in the Language Editor you can import a text file that should contain one item per line. You can also export the list to such a file.

Add terminator characters to the list if the language use them.

Keywords

Source Edit separates keywords into regular keywords and scope keywords. In procedural languages scoping keywords are those that you would normally indent the code between. In SGML like languages the scope keywords are the tag characters. There must be a starting and an ending scope keyword.

Operators

This list is for all the operators the language use. You can also use this list to add words you want colorized in a different color then keywords.

Comments

Add both single line comments and starting and ending multiple line comments to the corresponding lists.

Tag Elements

Tag elements only exists between the scoping keywords in SGML style languages.

Tag Attributes

Much like tag elements, attributes also only exists between scoping keywords in SGML style languages.

Tag Entities

Unlike tag elements and attributes, tag entities can exists anywhere in a file. You can also use this list to add words you want colorized with a different color then keywords and operators.


Code Templates - Tools menu

Tools menu

Code Templates

Code templates are small pieces of code that you assign a name to and use with one language. When you edit a file of that language you can then type in the name of the code template and click the Apply Code Template menu item. The name will then be replaced with the code you have assigned. You can use the Keyboard page of the Options dialog box to assign a shortcut key to the ApplyCodeTemplate command (Ctrl+Enter is the default).

You use the Code Template Manager to create your templates.

Use the Caret Position button [image] to determent where the text caret should be placed after the template has been inserted.

See also: File Templates


Tools menu

Open in associated application

Will open the current file in the associated application, if any.

Run

This will bring up the Source Edit Run dialog box which will allow you to open a program, folder, document, or Internet resource.

RGB Mixer

This command will bring up the RGB Mixer dialog box.

This tool allows you to mix a color using red, green, and blue values and you can insert the color in one of eleven different formats. The RGB Mixer also includes 3 different color palettes.

Insert Strings

This tool will bring up a dialog box that allows you to type in a starting and an ending string that will be added to each of the selected lines in the current document. This can be very usefull when you copy text between different documents. For example: let's say you have the following SQL statement in one file:

SELECT Field1, Field2
FROM tblTableName
WHERE ID=1
AND Field1 LIKE '%a%'
ORDER BY Field2;

Now you want to put this in a VBScript file in which you need to change the text to the following:

sSql = "SELECT Field1, Field2" & _
"FROM tblTableName" & _
"WHERE ID=1" & _
"AND Field1 LIKE '%a%'" & _
"ORDER BY Field2;"

You can then use this tool to add a quotation mark at the start of each line and a quotation mark, ampursand, and the underscore character ( " & _ ) at the end of each line.

With the Insert after indentation option checked, the starting string will be inserted before the first non-whitespace character. Otherwise, the starting string will be inserted at the first character position of each selected line.

Keyboard macros

Source Edit allows you to record keyboard macros. Up to 10 macros can exist at one time. When a macro has been recorded Source Edit will ask you for a keyboard shortcut key to use for the macro.

Repeat command

You can repeat a command or keystroke a specified number of times by using this command.

Divider line

This command will create or remove a divider line under the current line.


Options dialog box - Tools menu

Tools Menu

Options

In the options dialog box you find most of the settings for Source Edit. The dialog contains 6 nodes or pages.

Settings

Show left margin will show a selection field to the left of the document window. By clicking this area you can select a whole row.

Line tooltip on scroll will show a tooltip with the top line when you're dragging the vertical scrollbar thumb.

Allow drag and drop will allow you to drag and drop selected text to move or copy it (hold down the CTRL key to copy text).

Allow column selection will allow you to select columns of text by holding down either the Ctrl or Alt key while dragging the mouse.

Persist bookmarks. If you set this option all bookmarks you have in a file will be saved so they appear again when the file is reopened.

No blank document on start will not create a blank document when you launch Source Edit.

Backup files before saving changes will take a backup of the current file before you save any changes. It adds a .BAK extension to the file, so Index.htm becomes Index.htm.bak

Confine caret to text if this option is not set you can put the text caret beyond the end of a line.

Color syntax highlighting will colorize all keywords, operators, tag elements etc. in the current document according to the syntax highlighter definition. You can create new highlighters using the Language Editor.

Highlight current line will highlight the line the text caret is currently in. This makes it easier to find the text caret if you have scrolled the document.

Show line numbers will show all the line numbers of the current document

Allow multiple instances, by default only one instance of Source Edit can be started. This will make sure that if you open a new document using the Windows Explorer that it will be sent to the current instance of Source Edit. But if you want you can let Windows start a new instance of Source Edit by checking this option.

Reload files on start, by checking this option all files that you have opened when you close Source Edit will be reopened when you start it again.

Clipboard History size determents how many clipboard clips Source Edit should remember. See also Paste and Cycle, Clipboard History.

Max undoable actions. By default Source Edit has an unlimited number of undoable actions. You can however set a limit to this to preserve some memory.

Language/Tabs

On this page you can set some language specific settings.

Fixup text case will fixup the case for all language keywords. This setting is set per language. Which means you can set it for one language while you can leave it unchecked for an other.

Function pattern. You can specify a function pattern for the selected language. A function pattern is a regular expression that describes a function or method for the language. This will assure that the Function List feature works. By default function patterns for the following languages are supplied with Source Edit: C/C++, Java, Visual Basic, Perl, ASP, and PHP.

Default language. You can set a default language that will be used for highlighting all new documents you create.

Auto indentation style. You can either follow language scoping, which means that the code will be indented after a scope keyword, or you could simply copy the indention from the previous line. This setting is set per language.

The Tab size setting is not set per language but rather for all documents however the Convert tabs to spaces setting is set per language.

Keyboard

On this page you can assign shortcut keys for all commands available in Source Edit. Simply press the key combination you would like to use in the New key assignment text box and click the Assign button. You might find some undocumented commands in the list.

Color/Font

On this page you can change how Source Edit colorizes different items and also change the font that is used. Source Edit only supports fixed-pinch or monospaced fonts.

Files

File mapping is what Source Edit use to determine which syntax highlighter it should use for which file. Simply select the language in the drop-down and type in the file filters in the Map to file(s) text box. Filters are separated with a ; semicolon.

Default File Type (PC, Unix, or Macintosh) will be used with all new documents you create. See also File Format.

File in Open/Save As dialogs. This list will be used in the file type list in the Open and Save As dialogs. It's also used in the File View window. To add to the list simply type in a File description and the file extentions filter. Filter are separated with a ; semicolon.

HTML Toolbar

The HTML Toolbar allows you to insert common HTML tags in the current document. It also have some useful tools such as Table creator, web safe color picker, Form Controls selector, and Special Character picker.

The toolbar is only visible for a selected number of languages that you specify on this page.

Read more about the HTML Toolbar.


Window menu

Split Horizontal/Vertical

Source Edit allows you to split one window into different frames. By doing so you have the ability to view different parts of a file at the same time. You can split a window horizonally and/or vertically giving upto 4 different frames at the same time.

You can also split a window using the "handles" above and to the left of the scrollbars.

Arrange Windows

You can arrange document windows in different manners. You can cascade the windows or tile them either horizontally or vertically. If any document windows are minimized you may also arrange those.

Show in Browser

You can at any time preview a file in your default web browser. You don't have to save the current document before using this preview function. Source Edit will create a temporary HTML file that will show in the browser. This file will be deleted when you close the document.


Custom help files - Help menu

Help menu

Custom Help Files

Source Edit allows you to add an unlimited number of help files to the environment. You can add both HTML help files (*.chm) as well as older WinHelp files (*.hlp). When you do this you assign the help file to be used with one language and you can then launch the help when you are editing a document for that language. To open the help file you would either click the "Use Custom Help" menu item or by pressing the shortcut key for this command (Ctrl+F1 by default, you can assign and change shortcut keys on the Keyboard page of the Options dialog box). The corresponding topic of the selected text or the word the insertion point is currently over in the document will then be displayed if it's found. Otherwise the closest match will be selected on the Index tab of the help file.

You can add more than one help file per language. If you do so Source Edit will ask you for which help file to open when you pick the "Use Custom Help" menu item. You can also add the same help file more then once and assign it to different languages.


Regular Expression

Regular Expression Syntax

A regular expression is a pattern of text that consists of ordinary characters (for example, letters a through z) and special characters, known as metacharacters. The pattern describes one or more strings to match when searching a body of text. The regular expression serves as a template for matching a character pattern to the string being searched.

Source Edit uses regular expressions for its Function List and Output Pattern. You can also use a regular expression when you're using the Find/Replace in Files dialog boxes. A partial portion of regular expressions can also be used with the standard Find and Replace dialog boxes.

Here are a couple of examples of regular expressions you might encounter:

^\[ \t]*$ | Match a blank line
\d{2}-\d{5} | Validate an ID number consisting of 2 digits, a hyphen, and another 5 digits.

The following table contains the complete list of metacharacters and their behavior in the context of regular expressions:

Character | Description
\ | Marks the next character as either a special character, a literal, a backreference, or an octal escape. For example, 'n' matches the character "n". '\n' matches a newline character. The sequence '\\' matches "\" and "\(" matches "(".
^ | Matches the position at the beginning of a line.
$ | Matches the position at the end of a line
* | Matches the preceding subexpression zero or more times. For example, to* matches "t", "to", and "too". * is equivalent to {0,}.
+ | Matches the preceding subexpression one or more times. For example, 'to+' matches "to" and "too", but not "t". + is equivalent to {1,}.
? | Matches the preceding subexpression zero or one time. For example, "do(es)?" matches the "do" in "do" or "does". ? is equivalent to {0,1}
{n} | n is a nonnegative integer. Matches exactly n times. For example, 'o{2}' does not match the 'o' in "Bob," but matches the two o's in "food".
{n,} | n is a nonnegative integer. Matches at least n times. For example, 'o{2,}' does not match the "o" in "Bob" and matches all the o's in "foooood". 'o{1,}' is equivalent to 'o+'. 'o{0,}' is equivalent to 'o*'.
{n,m} | m and n are nonnegative integers, where n <= m. Matches at least n and at most m times. For example, "o{1,3}" matches the first three o's in "fooooood". 'o{0,1}' is equivalent to 'o?'. Note that you cannot put a space between the comma and the numbers.
? | When this character immediately follows any of the other quantifiers (*, +, ?, {n}, {n,}, {n,m}), the matching pattern is non-greedy. A non-greedy pattern matches as little of the searched string as possible, whereas the default greedy pattern matches as much of the searched string as possible. For example, in the string "oooo", 'o+?' matches a single "o", while 'o+' matches all 'o's.
. | Matches any single character except "\n". To match any character including the '\n', use a pattern such as '[.\n]'.
(pattern) | Matches pattern and captures the match. The captured match can be retrieved in the Replace part of the Replace in Files dialog using $1 for the first captured match, $2 for the second, $9 for the ninth. For example if you do a regular expression search using this pattern: ([0-9]+)-([0-9]+) it will match a sequence of numbers followed by another sequence of numbers separated by a hyphen. If you then would replace that with this: $2-$1 it will change the order of the sequence of numbers. To match parentheses characters ( ), use '\(' or '\)'.
(?:pattern) | Matches pattern but does not capture the match, that is, it is a non-capturing match that is not stored for possible later use. This is useful for combining parts of a pattern with the "or" character (|). For example, 'industr(?:y|ies) is a more economical expression than 'industry|industries'.
(?=pattern) | Positive lookahead matches the search string at any point where a string matching pattern begins. This is a non-capturing match, that is, the match is not captured for possible later use. For example 'Windows (?=95|98|NT|2000)' matches "Windows" in "Windows 2000" but not "Windows" in "Windows 3.1". Lookaheads do not consume characters, that is, after a match occurs, the search for the next match begins immediately following the last match, not after the characters that comprised the lookahead.
(?!pattern) | Negative lookahead matches the search string at any point where a string not matching pattern begins. This is a non-capturing match, that is, the match is not captured for possible later use. For example 'Windows (?!95|98|NT|2000)' matches "Windows" in "Windows 3.1" but does not match "Windows" in "Windows 2000". Lookaheads do not consume characters, that is, after a match occurs, the search for the next match begins immediately following the last match, not after the characters that comprised the lookahead.
x|y | Matches either x or y. For example, 'm|food' matches "m" or "food". '(m|f)ood' matches "mood" or "food".
[xyz] | A character set. Matches any one of the enclosed characters. For example, '[abc]' matches the 'a' in "plain".
[^xyz] | A negative character set. Matches any character not enclosed. For example, '[^abc]' matches the 'p' in "plain".
[a-z] | A range of characters. Matches any character in the specified range. For example, '[a-z]' matches any lowercase alphabetic character in the range 'a' through 'z'.
[^a-z] | A negative range characters. Matches any character not in the specified range. For example, '[^a-z]' matches any character not in the range 'a' through 'z'.
\b | Matches a word boundary, that is, the position between a word and a space. For example, 'er\b' matches the 'er' in "never" but not the 'er' in "verb".
\B | Matches a nonword boundary. 'er\B' matches the 'er' in "verb" but not the 'er' in "never".
\cx | Matches the control character indicated by x. For example, \cM matches a Control-M or carriage return character. The value of x must be in the range of A-Z or a-z. If not, c is assumed to be a literal 'c' character.
\d | Matches a digit character. Equivalent to [0-9].
\D | Matches a nondigit character. Equivalent to [^0-9].
\f | Matches a form-feed character. Equivalent to \x0c and \cL.
\n | Matches a newline character. Equivalent to \x0a and \cJ.
\r | Matches a carriage return character. Equivalent to \x0d and \cM.
\s | Matches any whitespace character including space, tab, form-feed, etc. Equivalent to [ \f\n\r\t\v].
\S | Matches any non-whitespace character. Equivalent to [^ \f\n\r\t\v].
\t | Matches a tab character. Equivalent to \x09 and \cI.
\v | Matches a vertical tab character. Equivalent to \x0b and \cK. (Not used in Source Edit
\w | Matches any word character including underscore. Equivalent to '[A-Za-z0-9_]'.
\W | Matches any nonword character. Equivalent to '[^A-Za-z0-9_]'.
\xn | Matches n, where n is a hexadecimal escape value. Hexadecimal escape values must be exactly two digits long. For example, '\x41' matches "A". '\x041' is equivalent to '\x04' & "1". Allows ASCII codes to be used in regular expressions.
\num | Matches num, where num is a positive integer. A reference back to captured matches. For example, '(.)\1' matches two consecutive identical characters.
\n | Identifies either an octal escape value or a backreference. If \n is preceded by at least n captured subexpressions, n is a backreference. Otherwise, n is an octal escape value if n is an octal digit (0-7).
\nm | Identifies either an octal escape value or a backreference. If \nm is preceded by at least nm captured subexpressions, nm is a backreference. If \nm is preceded by at least n captures, n is a backreference followed by literal m. If neither of the preceding conditions exist, \nm matches octal escape value nm when n and m are octal digits (0-7).
\nml | Matches octal escape value nml when n is an octal digit (0-3) and m and l are octal digits (0-7).
\un | Matches n, where n is a Unicode character expressed as four hexadecimal digits. For example, \u00A9 matches the copyright symbol (©).


HTML Toolbar

The HTML Toolbar is displayed across the top of the current document window but it's only visible for a selected number of syntax highlighters, by default for HTML, XML, ASP, and PHP. You can specify the languages the toolbar should be visible for in the Options dialog box. You can also show or hide the toolbar using the View > Toolbar menu or the context menu (right-click), but the specified syntax highlighters will still be used when you save the document, which might either show or hide the toolbar depending on the settings you have picked.

The toolbar provides quick access to some common HTML tags, but also has some very useful tools like a web-safe color picker, Form Controls selector, Table creator, and Special Character picker. You can also add custom tags.

Sets the selected text to bold.
Sets the selected text to italic.
Underlines the selected text.
Inserts an image. A dialog will be presented that allows you to select the image to insert.
Inserts an anchor tag.
Drops down the Table Creator which makes it simple to insert a HTML table.
Inserts a Script.
Drops down the web-safe color picker. It shows Netscape's 216 colors which you can choose with a mouse click. By clicking the More Colors... link at the bottom the RGB Mixer will be shown.
Drops down the Special Character picker.
Drops down the Form Controls selector that allows you to insert a HTML Form Control, such as a text box, button, and so on.
Inserts an ordered list.
Inserts a bulleted or unordered list.
Inserts or puts the selected text into a new paragraph.
Inserts a break.
Centers the selected text.
Sets the selected text heading.
Inserts a horizontal ruler.
Inserts a non-breaking space.
Inserts a HTML comment.
Inserts a Font tag.
Allows you to define or insert a custom text. The custom tag feature can be used to insert any text to the current document. It's not limited to HTML tags.


Command Line Switches

Source Edit supports a few switches that you can use if you launch Source Edit from a command line.

SrcEdit.exe [FileName] [-NoPathChange] [-Col:nn] [-Line:nn]

FileName | The path and name of a document to open.
-NoPathChange | By default if Source Edit is launched and a file is passed on the command line the File Window will change to show the path of that file. If the file resides on a remote network it can take Source Edit some time to populate the File Window. By using this switch Source Edit will not change the path.
-Col:nn | Specifies the column number that should be selected in the file where nn is a number.
-Line:nn | Specifies the line number that should be selected in the file where nn is a number. If the number is higher then the number of lines in the file the last line will be selected.


Acknowledgments

Many people have made Source Edit into what it is today by providing help and suggestions through email and through the Source Edit forum. However particular thanks goes to the Source Edit Testing Team members (see more in the About box in Source Edit). I also want to thank Len Philpot for his help with spell checking and testing of File Courier and also a special thanks goes to Roland Pot for the Source Edit logo.

Source Edit uses code originally created by Barry Allen and Nathan Lewis. It also uses code created by Steve McMahon, vbaccelerator.com.

The Source Edit installation program is created using InnoSetup, Copyright © 1997-2003 Jordan Russell. All rights reserved.